<?php

namespace Platform\Models\Scenario;

use Platform\Models\BaseModel;

class Material extends BaseModel {

    const TABLE_NAME = 'material';

    public function initialize() {
        parent::initialize();
        $this->setSource(self::TABLE_NAME);
    }

    private $id;
    private $name;
    private $url;
    private $groupId;
    private $type;
    private $duration;
    private $videoCover;
    private $createTime;
    private $createUser;
    private $status;
    private $isDel;

    public function getId() {
        return $this->id;
    }

    public function getName() {
        return $this->name;
    }

    public function getUrl() {
        return $this->url;
    }

    public function getGroupId() {
        return $this->groupId;
    }

    public function getType() {
        return $this->type;
    }

    public function getDuration() {
        return $this->duration;
    }

    public function getVideoCover() {
        return $this->videoCover;
    }

    public function getCreateTime() {
        return $this->createTime;
    }

    public function getCreateUser() {
        return $this->createUser;
    }

    public function getStatus() {
        return $this->status;
    }

    public function getIsDel() {
        return $this->isDel;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setName($name) {
        $this->name = $name;
    }

    public function setUrl($url) {
        $this->url = $url;
    }

    public function setGroupId($groupId) {
        $this->groupId = $groupId;
    }

    public function setType($type) {
        $this->type = $type;
    }

    public function setDuration($duration) {
        $this->duration = $duration;
    }

    public function setVideoCover($videoCover) {
        $this->videoCover = $videoCover;
    }

    public function setCreateTime($createTime) {
        $this->createTime = $createTime;
    }

    public function setCreateUser($createUser) {
        $this->createUser = $createUser;
    }

    public function setStatus($status) {
        $this->status = $status;
    }

    public function setIsDel($isDel) {
        $this->isDel = $isDel;
    }

    public function columnMap() {
        //列名 =》 属性名
        return [
            "id" => "id",
            "name" => "name",
            "url" => "url",
            "type" => "type",
            'group_id' => 'groupId',
            'duration' => 'duration',
            'video_cover' => 'videoCover',
            'create_time' => 'createTime',
            'create_user' => 'createUser',
            'status' => 'status',
            'is_del' => 'isDel',
        ];
    }

}
